<?php
/**
 * Created by PhpStorm.
 * User: 2016-08-23
 * Date: 2017/8/4
 * @desc : 增加支付方式到场景
 * Time: 10:50
 */
$api_service_path = __DIR__ . "/../../../api/";
ob_start();
require_once($api_service_path . "public/index.php");
ob_end_clean();

$mdb=MaintenanceShops::all();
foreach ($mdb as $_mdb) {
    $arr1 = [25,26];
    foreach($arr1 as $ar){
        $ss = array(
            'scene_id' => 1,
            'type_id' => $ar,
            'shop_id' => $_mdb->id,
            'available' => 1,
            'optional' => 1,
            'selected' => 0,
            'is_default' => 0,
            'created_by' => null,
            'updated_by' => null,
        );
        DB::table('all_pay_scene_types')->insert($ss);
        $ss1 = array(
            'scene_id' => 2,
            'type_id' => $ar,
            'shop_id' => $_mdb->id,
            'available' => 1,
            'optional' => 1,
            'selected' => 0,
            'is_default' => 0,
            'created_by' => null,
            'updated_by' => null,
        );
        DB::table('all_pay_scene_types')->insert($ss1);
        $ss2 = array(
            'scene_id' => 3,
            'type_id' => $ar,
            'shop_id' => $_mdb->id,
            'available' => 1,
            'optional' => 1,
            'selected' => 0,
            'is_default' => 0,
            'created_by' => null,
            'updated_by' => null,
        );
        DB::table('all_pay_scene_types')->insert($ss2);
        $ss3 = array(
            'scene_id' => 4,
            'type_id' => $ar,
            'shop_id' => $_mdb->id,
            'available' => 1,
            'optional' => 1,
            'selected' => 0,
            'is_default' => 0,
            'created_by' => null,
            'updated_by' => null,
        );
        DB::table('all_pay_scene_types')->insert($ss3);
        $ss4 = array(
            'scene_id' => 5,
            'type_id' => $ar,
            'shop_id' => $_mdb->id,
            'available' => 1,
            'optional' => 1,
            'selected' => 0,
            'is_default' => 0,
            'created_by' => null,
            'updated_by' => null,
        );
        DB::table('all_pay_scene_types')->insert($ss4);
    }
 
}
